:root {
    --border-opacity: 0.05;
    --blur-amount: 0.6px;
    --reflection-position: 0%;
    --reflection-angle: -25deg;
    --primary-color: rgba(108, 92, 231, 0.7);
    --secondary-color: rgba(0, 184, 148, 0.7);
    --accent-color: rgba(253, 121, 168, 0.7);
    --danger-color: rgba(231, 76, 60, 0.7);
    --dark-bg: #0F111A;
    --glass-bg: rgba(30, 33, 52, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-radius: 16px;
    --transition-speed: 0.5s;
    --blur-amount: 10px;
}

/* 液态玻璃效果基础类 */
.glass-effect {
    background: linear-gradient(45deg, rgba(240, 248, 255, 0.0005), rgba(220, 230, 255, 0.003));
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(200, 220, 255, var(--border-opacity)); border-radius: var(--border-radius);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    transition-property: --reflection-position, --reflection-angle;
    position: relative;
    will-change: transform, opacity;
    transform: translateZ(0);
    contain: layout paint;
    backface-visibility: hidden;
    box-shadow: 0 2px 8px 0 rgba(100, 149, 237, 0.01), 0 0 0 1px rgba(200, 220, 255, 0.05);
}
/* 此空选择器无效，需补充为有效的 @ 规则或选择器，当前示例补充为占位注释，请按需修改 */
/* 为保持代码完整性，补充一个空的媒体查询 @ 规则示例 */
@media (max-width: 320px) {
    /* 可按需添加此屏幕尺寸下的样式 */
}

.editor-input-area.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 101%; left: -0.5%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.015), transparent);
    mix-blend-mode: overlay;
    transform: skewX(var(--reflection-angle));
    left: var(--reflection-position);
    animation: glass-reflection 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.editor-input-area.glass-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 101%; left: -0.5%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120,180,255,0.001), transparent);
    mix-blend-mode: soft-light;
    transform: skewX(calc(var(--reflection-angle) * 0.5));
    left: calc(var(--reflection-position) * 0.8);
    animation: moveReflectionSecondary 24s infinite 6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.glass-effect::nth-child(3) {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220,240,255,0.08), transparent);
    transform: skewX(-20deg);
    animation: glass-reflection 9s infinite 1.5s cubic-bezier(0.15, 0.85, 0.3, 1);
    pointer-events: none;
}

.glass-effect .third-reflection {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240,248,255,0.06), transparent);
    transform: skewX(-18deg);
    animation: glass-reflection 7s infinite 2.5s ease-in-out;
    pointer-events: none;
}

@keyframes glass-reflection {
    0% { transform: translateX(-100%) skewX(var(--reflection-angle)); }
    100% { transform: translateX(100%) skewX(var(--reflection-angle)); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 280px;
    padding: 25px 0;
    transition: width var(--transition-speed);
    z-index: 10;
}

.logo {
    padding: 0 25px 25px;
    border-bottom: 1px solid rgba(255, 255, 0.1);
    margin-bottom: 25px;
}

.logo h1 {
    font-size: 28px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 0 15px;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    width: 100%;
    margin-bottom: 20px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.danger-btn {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--border-radius);
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.1);
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.3), rgba(192, 57, 43, 0.3));
    border-color: rgba(231, 76, 60, 0.4);
    color: rgba(255, 255, 255, 1);
}

.delete-project-btn {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: rgba(231, 76, 60, 0.8);
    cursor: pointer;
    opacity: 0.8;
    transition: all var(--transition-speed);
    margin-left: auto;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.delete-project-btn:hover {
    opacity: 1;
    color: #e74c3c;
}

.nav-section h3 {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 15px 15px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-section li:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-section li.active {
    background-color: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
}

.project-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 280px;
}

.sidebar-footer button {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    background-color: transparent;
    border: 1px solid rgba(255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed);
}

.sidebar-footer button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* 液态玻璃效果悬停动画 */
.glass-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.welcome-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

.welcome-content {
    max-width: 600px;
}

.welcome-screen h2 {
    font-size: 42px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #fff, #b2becd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.welcome-screen p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

#welcome-screen .primary-btn {
    width: auto;
    padding: 15px 30px;
    font-size: 16px;
}

/* 项目界面样式 */
.project-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.project-header h2 {
    font-size: 28px;
}

.project-actions {
    display: flex;
    gap: 15px;
}

.project-actions button:not(.primary-btn) {
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.project-actions button:not(.primary-btn):hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.notes-container {
    display: flex;
    gap: 30px;
    height: calc(100% - 100px);
}

.notes-list {
    width: 300px;
    border-radius: var(--border-radius);
    padding: 20px;
    overflow-y: auto;
}

.note-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.editor-btn {
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.editor-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.separator {
    width: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
}

#note-title-input {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 24px;
    padding: 20px;
      outline: none;
}

#note-content {
    flex: 1;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 20px;
      outline: none;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-y: auto;
}

#note-content p {
    margin-bottom: 15px;
}

#note-content h1, #note-content h2, #note-content h3 {
    margin: 25px 0 15px;
}

#note-content ul, #note-content ol {
    margin: 15px 0 15px 25px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 500px;
    max-width: 90%;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 16px;
}

.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-body textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cancel-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-footer .primary-btn {
    margin-bottom: 0;
    width: auto;
}

.tag-input-container {
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

#new-project-tags {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    margin-bottom: 10px;
}

#tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag-suggestion {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tag-suggestion:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.project-tags {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: all var(--transition-speed);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .notes-container {
        flex-direction: column;
    }
    .notes-list {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 20px 0;
    }
    .logo h1, .logo p, .nav-section h3, .nav-section li span, .sidebar-footer button span {
        display: none;
    }
    .sidebar-nav {
        padding: 0 5px;
    }
    .primary-btn span {
        display: none;
    }
    .primary-btn {
        justify-content: center;
        padding: 12px;
    }
    .nav-section li {
        justify-content: center;
        padding: 12px;
    }
    .sidebar-footer {
        width: 70px;
    }
    .main-content {
        padding: 20px 15px;
    }
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .project-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        width: 100%;
        z-index: 100;
        padding: 0;
    }
    .logo, .nav-section, .sidebar-footer {
        display: none;
    }
    .sidebar-nav {
        padding: 0;
        height: 100%;
    }
    .sidebar-nav .primary-btn {
        margin: 0;
        height: 100%;
        border-radius: 0;
    }
    .main-content {
        padding-bottom: 80px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}